//
//  AccountSafelyController.m
//  yameishe3
//
//  Created by pro on 2017/3/3.
//  Copyright © 2017年 yameishe. All rights reserved.
//

#import "AccountSafelyController.h"
#import "MemberChangeEmailController.h"
#import "MemberChangePhoneController.h"
#import "MemberChangePasswordController.h"
#import "MemberQuestionController.h"
@interface AccountSafelyController ()

@end

@implementation AccountSafelyController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)viewWillDisappear:(BOOL)animated {
    // 反注册键盘
    [super viewWillDisappear:YES];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(IBAction)onTouchButton:(UIButton*)sender
{
    switch (sender.tag) {
        case 0:
        {
            NSLog(@"修改手机号");
            MemberChangePhoneController *vc = [[UIStoryboard storyboardWithName:@"Member" bundle:nil] instantiateViewControllerWithIdentifier:@"MemberChangePhoneController"];
            [self.navigationController pushViewController:vc animated:YES];
        }
            break;
        case 1:
        {
            NSLog(@"修改密码");
            
            MemberChangePasswordController *vc = [[UIStoryboard storyboardWithName:@"Member" bundle:nil] instantiateViewControllerWithIdentifier:@"MemberChangePasswordController"];
            [self.navigationController pushViewController:vc animated:YES];
            
        }
            break;
        case 2:
        {
            NSLog(@"修改邮箱");
            MemberChangeEmailController *vc = [[UIStoryboard storyboardWithName:@"Member" bundle:nil] instantiateViewControllerWithIdentifier:@"MemberChangeEmailController"];
            [self.navigationController pushViewController:vc animated:YES];
        }
            break;
        case 3:
        {
            NSLog(@"密保设置");
            MemberQuestionController *vc = [[UIStoryboard storyboardWithName:@"Member" bundle:nil] instantiateViewControllerWithIdentifier:@"MemberQuestionController"];
            [self.navigationController pushViewController:vc animated:YES];
        }
            break;
        default:
            break;
    }

}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
